package com.hxzy.mapstruct;

import com.hxzy.controller.admin.dict.req.DictDataAddReq;
import com.hxzy.controller.admin.dict.req.DictDataEditReq;
import com.hxzy.controller.admin.dict.resp.DictDataResp;
import com.hxzy.entity.SysDictData;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface DictDataMapStruct {
    DictDataMapStruct INSTANCE= Mappers.getMapper(DictDataMapStruct.class);

    /**
     * 新增转换
     * @param req
     * @return
     */
    SysDictData convert(DictDataAddReq req);

    DictDataResp convert(SysDictData db);

    /**
     * 修改转换
     * @param req
     * @return
     */
    SysDictData convert(DictDataEditReq req);
}
